package com.pig4cloud.pig.propertyroom.feign;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.pig4cloud.pig.common.core.constant.ServiceNameConstants;
import com.pig4cloud.pig.common.core.util.R;
import com.pig4cloud.pig.resident.feign.dto.ResidentDto;
import com.pig4cloud.pig.resident.feign.dto.UnResidentDto;
import com.pig4cloud.pig.resident.feign.entity.Resident;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@FeignClient(contextId = "remoteResidentService", value = ServiceNameConstants.RESIDENT_SERVICE)

public interface RemoteResidentService {
	@GetMapping("/resident/getResident")
	public R getResident(@RequestParam("roomId") Long roomId);

	@PostMapping("/resident/getUnResident")
	public Page<Resident> getUnResident(@RequestBody UnResidentDto unResidentDto);

	@DeleteMapping("/resident/deleteRelativeResident")
	public R deleteRelativeResident(@RequestParam("ids") Long[] ids, @RequestParam("roomId") Long roomId);

	@GetMapping("/resident/addRelativeResident")
	public R addRelativeResident(@RequestParam("ids") Long[] ids, @RequestParam("roomId") Long roomId);
}
